home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 6⁄8⁄90 / 1402-More Focus Fixing-Jun90 < prev    next >
Encoding:
Text File  |  1990-06-08  |  2.9 KB  |  78 lines  |  [TEXT/GEOL]

  1. Item    1423343                         5-June-90        04:56PDT
  2.  
  3. From:   CHADWICK1                       Attain, Dan Chadwick,PRT
  4.  
  5. To:     D4695                           Skywalker Sys, Scott Collins,PRT
  6.         MOOF                            Rollin, Keith A
  7.         MACAPP.TECH$                    MacApp Technical
  8.         MACDTS                          Macintosh Developer Tech Supt
  9.  
  10. Sub:    More Focus Fixing
  11.  
  12. Hi,
  13.  
  14. I too, am having trouble with the changes made to Focus in 2.0 Final.  The
  15. solution proposed by Scott Collins partially fixed my problems.  In my
  16. application I have a collection of overlaping views of the same data, only one
  17. of which is visible at a time.  I use Show to switch from one view to another.
  18. (This is nice for performance and human interface reasons.)  I also need to
  19. hide, rather than dim, certain buttons sometimes.
  20.  
  21. Therefore, my ideal solution would:
  22.  
  23. 1. Let me show/hide a view & its subviews by using Show.
  24. 2. Visually activate & deactivate the scroll bars of only the views that are
  25. actually shown.
  26. 3.  Only draw & hit test the controls that are shown & in a shown superview.
  27.  
  28.  
  29. Mr. Collin's fix addresses 3.  I gave up on 1 and use SetCMgrVisibility instead
  30. (hassle).  For 2, I suggest:
  31.  
  32. procedure TSScrollBar.Activate (entering: BOOLEAN);
  33.     OVERRIDE;
  34.  
  35.     procedure SetScrollBar;
  36.     …
  37.  
  38. begin
  39.     if fCMgrControl <> nil then begin
  40.         if Focus & fSuperView.IsShown then begin
  41.             { fSuperView.IsShown assumes self.fShown - rash?}
  42.             SetScrollBar;
  43.         end
  44.         else begin
  45.             SetCMgrVisibility(entering);
  46.         end;
  47.     end;
  48. {•  WhileFocused(SetScrollBar, Focus); DC 6/1/90 •}
  49. end;
  50.  
  51. This will prevent scroll bars which are not "shown" from being drawn during
  52. duing activate and deactivate.  I would have prefered fShown to be supported by
  53. TCtlMgr.  I have not found any bad side effects in my appication (yet), but
  54. nonetheless I would welcome a general solution from a source more knowledgeable
  55. than myself.
  56.  
  57. There are other problems which still have not been addressed.  For instance,
  58. selecting a cell in a TGridView will highlight the selection even if the view
  59. is not shown.  This is different from 2.0ß9.  I have searched for the
  60. references to Focus in MacApp and it appears that about half of them don't
  61. check IsShown or IsVisible.  Some substantial portion of these appear, both for
  62. compatibility and for my personal needs, to be bugs.  In fact it is hard for me
  63. to see for what fShown is useful at all now; it is not used consistently.
  64.  
  65. Can someone tell me why Focus no longer checks fShown in 2.0 final?
  66.  
  67. Also, my application now runs considerably slower after convertion from ß9 & I
  68. suspect that Focus returning true more often is the culprit.  (Remember, I have
  69. lots of unshown views.)
  70.  
  71. Without fully understanding the meaning of this closing, I guess I should be,
  72.  
  73. Dan Chadwick
  74.  
  75.  
  76. P.S. Please respond to Chadwick1 as I'm not a member of TECH$.
  77.  
  78.